package cn.lg.soar.general.entity;

import cn.lg.soar.database.base.entity.BaseEntity;
import cn.lg.soar.database.base.entity.ITenantEntity;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.io.Serializable;

/**
 * 页面位置内容
 * @author luguoxiang
 * @since 2023-03-19
 * 开源项目：https://gitee.com/lgx1992/lg-soar 求star！请给我star！请帮我点个star！
 */
@Getter
@Setter
@Accessors(chain = true)
@ApiModel(value = "WebContent", description = "页面位置内容")
@TableName("lg_general_web_content")
public class WebContent extends BaseEntity implements ITenantEntity, Serializable {


    @ExcelIgnore
    @ApiModelProperty(value = "id")
    @TableId
    private Long id;

    @ExcelProperty(value = "位置id")
    @ApiModelProperty(value = "位置id")
    private Long positionId;

    @ExcelProperty(value = "标题")
    @ApiModelProperty(value = "标题")
    private String title;

    @ExcelProperty(value = "副标题")
    @ApiModelProperty(value = "副标题")
    private String subtitle;

    @ExcelProperty(value = "封面图")
    @ApiModelProperty(value = "封面图")
    private String coverImage;

    @ExcelProperty(value = "状态")
    @ApiModelProperty(value = "状态")
    private Integer status;

    @ExcelProperty(value = "排序")
    @ApiModelProperty(value = "排序")
    private Integer sort;

    @ExcelProperty(value = "元数据(携带的参数，如：url、id、json)")
    @ApiModelProperty(value = "元数据(携带的参数，如：url、id、json)")
    private String metadata;

    @ApiModelProperty(value = "租户id")
    @JsonIgnore
    @TableField(select = false)
    private Integer tenantId;

    @JsonIgnore
    @Override
    public Serializable primaryKey() {
        return this.id;
    }

}
